package com.tj.collection.enums;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Author: pavan
 * Date: 2020/11/4 11:49 上午
 */
public enum ClOverdueTimeEnum {
    D0(0, -2, 0, "0 days"),
    S1(1, 1, 7, "1-7days"),
    S2(2, 8, 15, "8-15days"),
    M1(3, 16, 45, "16-30days"),
    X(4, 45, 999999, "31-60days"),
    ;

    private Integer type;

    private Integer start;

    private Integer end;

    private String desc;

    ClOverdueTimeEnum(Integer type, Integer start, Integer end, String desc) {
        this.type = type;
        this.start = start;
        this.end = end;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public  ClOverdueTimeEnum setType(Integer type) {
        this.type = type;
        return this;
    }

    public Integer getStart() {
        return start;
    }

    public  ClOverdueTimeEnum setStart(Integer start) {
        this.start = start;
        return this;
    }

    public Integer getEnd() {
        return end;
    }

    public  ClOverdueTimeEnum setEnd(Integer end) {
        this.end = end;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public  ClOverdueTimeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    private static List<ClOverdueTimeEnum> clOverdueTimeEnumList = null;

    public static List<ClOverdueTimeEnum> getClOverdueTimeEnumList() {
        if (clOverdueTimeEnumList == null) {
            clOverdueTimeEnumList = new ArrayList<>(Arrays.asList( ClOverdueTimeEnum.values()));
        }
        return clOverdueTimeEnumList;
    }
}
